import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;


public class EIDatuEzZuzena extends JDialog {

	private JButton okButton;
	
	public EIDatuEzZuzena() {
		elementuakHasieratu();
		botoiakHasieratu();
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setVisible(true);
	}
	
	public void elementuakHasieratu(){
		
		setBounds(300, 250, 450, 300);
		getContentPane().setLayout(null);
		
		okButton = new JButton("OK");
		okButton.setBounds(181, 159, 77, 25);
		getContentPane().add(okButton);
		
		
		JLabel lblDatuOkerraSartu = new JLabel("Datu okerra sartu duzu.");
		lblDatuOkerraSartu.setFont(new Font("Dialog", Font.BOLD, 14));
		lblDatuOkerraSartu.setBounds(120, 100, 298, 15);
		getContentPane().add(lblDatuOkerraSartu);
			
	}
	
	public void botoiakHasieratu(){
		okButton.addActionListener(new ActionListener(){
			public void actionPerformed(ActionEvent e){
				setVisible(false);
				EIDatuEzZuzena.this.dispose();
			}
		});
	}

}
